﻿<Activity mc:Ignorable="sap sap2010 sads" x:Class="T2.Logging.Business.Workflows.TenantNonQuery"
 xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities"
 xmlns:av="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
 xmlns:mca="clr-namespace:Microsoft.CSharp.Activities;assembly=System.Activities"
 xmlns:s="clr-namespace:System;assembly=mscorlib"
 xmlns:sads="http://schemas.microsoft.com/netfx/2010/xaml/activities/debugger"
 xmlns:sap="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation"
 xmlns:sap2010="http://schemas.microsoft.com/netfx/2010/xaml/activities/presentation"
 xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib"
 xmlns:sco="clr-namespace:System.Collections.ObjectModel;assembly=mscorlib"
 xmlns:tlb="clr-namespace:T2.Logging.Business;assembly=T2.Logging.Business.Entities"
 xmlns:tlbei="clr-namespace:T2.Logging.Business.Entities.Interfaces;assembly=T2.Logging.Business.Entities"
 xmlns:tlbesi="clr-namespace:T2.Logging.Business.Entities.Search.Interfaces;assembly=T2.Logging.Business.Entities"
 xmlns:tlbwa="clr-namespace:T2.Logging.Business.Workflow.Activites;assembly=T2.Logging.Business.Workflow.Activities"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <x:Members>
    <x:Property Name="BusinessService" Type="InArgument(tlb:IBusinessService)" />
    <x:Property Name="Param" Type="InArgument(tlbei:ITenant_biz)" />
    <x:Property Name="RetVal" Type="OutArgument(scg:IDictionary(x:String, x:Int32))" />
    <x:Property Name="Ex" Type="OutArgument(s:Exception)" />
    <x:Property Name="RoleNames" Type="InArgument(s:String[])" />
  </x:Members>
  <sap2010:ExpressionActivityEditor.ExpressionActivityEditor>C#</sap2010:ExpressionActivityEditor.ExpressionActivityEditor>
  <sap2010:WorkflowViewState.IdRef>T2.Logging.Business.Workflows.ApplicationNonQuery_1</sap2010:WorkflowViewState.IdRef>
  <TextExpression.NamespacesForImplementation>
    <sco:Collection x:TypeArguments="x:String">
      <x:String>System</x:String>
      <x:String>System.Collections.Generic</x:String>
      <x:String>System.Data</x:String>
      <x:String>System.Linq</x:String>
      <x:String>System.Text</x:String>
      <x:String>T2.Logging.Business</x:String>
      <x:String>T2.Logging.Business.Entities.Interfaces</x:String>
      <x:String>T2.Logging.Business.Entities.Search</x:String>
      <x:String>T2.Logging.Business.Entities</x:String>
    </sco:Collection>
  </TextExpression.NamespacesForImplementation>
  <TextExpression.ReferencesForImplementation>
    <sco:Collection x:TypeArguments="AssemblyReference">
      <AssemblyReference>System</AssemblyReference>
      <AssemblyReference>System.Activities</AssemblyReference>
      <AssemblyReference>System.Configuration</AssemblyReference>
      <AssemblyReference>System.Core</AssemblyReference>
      <AssemblyReference>System.Drawing</AssemblyReference>
      <AssemblyReference>System.ServiceModel</AssemblyReference>
      <AssemblyReference>System.ServiceModel.Activities</AssemblyReference>
      <AssemblyReference>System.Web</AssemblyReference>
      <AssemblyReference>System.Web.ApplicationServices</AssemblyReference>
      <AssemblyReference>System.Web.Http</AssemblyReference>
      <AssemblyReference>System.Web.Services</AssemblyReference>
      <AssemblyReference>System.Workflow.Activities</AssemblyReference>
      <AssemblyReference>System.Workflow.ComponentModel</AssemblyReference>
      <AssemblyReference>System.Workflow.Runtime</AssemblyReference>
      <AssemblyReference>System.WorkflowServices</AssemblyReference>
      <AssemblyReference>System.Xaml</AssemblyReference>
      <AssemblyReference>System.Xml.Linq</AssemblyReference>
      <AssemblyReference>System.Data.DataSetExtensions</AssemblyReference>
      <AssemblyReference>Microsoft.CSharp</AssemblyReference>
      <AssemblyReference>System.Data</AssemblyReference>
      <AssemblyReference>System.Xml</AssemblyReference>
      <AssemblyReference>T2.Logging.Business.Entities</AssemblyReference>
      <AssemblyReference>T2.Logging.Business.Workflow.Activities</AssemblyReference>
      <AssemblyReference>T2.Logging.Common</AssemblyReference>
      <AssemblyReference>T2.Logging.Data</AssemblyReference>
      <AssemblyReference>mscorlib</AssemblyReference>
      <AssemblyReference>T2.Logging.Business</AssemblyReference>
    </sco:Collection>
  </TextExpression.ReferencesForImplementation>
  <Flowchart sap2010:WorkflowViewState.IdRef="Flowchart_1">
    <Flowchart.Variables>
      <Variable x:TypeArguments="tlbei:ITenant_biz[]" Name="tenantParams" />
      <Variable x:TypeArguments="tlbei:ITenant_biz" Name="tenantParam" />
    </Flowchart.Variables>
    <Flowchart.StartNode>
      <FlowDecision x:Name="__ReferenceID4" sap2010:WorkflowViewState.IdRef="FlowDecision_1">
        <FlowDecision.Condition>
          <mca:CSharpValue x:TypeArguments="x:Boolean">RoleNames.Contains("super admin")</mca:CSharpValue>
        </FlowDecision.Condition>
        <FlowDecision.True>
          <FlowSwitch x:TypeArguments="x:String" x:Name="__ReferenceID0" sap2010:WorkflowViewState.IdRef="FlowSwitch`1_1">
            <FlowSwitch.Expression>
              <mca:CSharpValue x:TypeArguments="x:String">Param.Action</mca:CSharpValue>
            </FlowSwitch.Expression>
            <FlowStep x:Key="Add" x:Name="__ReferenceID1" sap2010:WorkflowViewState.IdRef="FlowStep_1">
              <Sequence DisplayName="Add Sequence" sap2010:WorkflowViewState.IdRef="Sequence_1">
                <tlbwa:Db_T2_Logging_Tenant_Search DisplayName="Tenant_Search" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Tenant_Search_1">
                  <tlbwa:Db_T2_Logging_Tenant_Search.BS>
                    <InArgument x:TypeArguments="tlb:IBusinessService">
                      <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                    </InArgument>
                  </tlbwa:Db_T2_Logging_Tenant_Search.BS>
                  <tlbwa:Db_T2_Logging_Tenant_Search.RetVal>
                    <OutArgument x:TypeArguments="tlbei:ITenant_biz[]">
                      <mca:CSharpReference x:TypeArguments="tlbei:ITenant_biz[]">tenantParams</mca:CSharpReference>
                    </OutArgument>
                  </tlbwa:Db_T2_Logging_Tenant_Search.RetVal>
                  <tlbwa:Db_T2_Logging_Tenant_Search.SearchParam>
                    <InArgument x:TypeArguments="tlbesi:ITenantSearch_biz">
                      <mca:CSharpValue x:TypeArguments="tlbesi:ITenantSearch_biz">new TenantSearch_biz{ Action="Search", PageNumber=1, PageSize=10, Role="user", SortColumn="TenantID", SortType="asc", TenantName=Param.TenantName}</mca:CSharpValue>
                    </InArgument>
                  </tlbwa:Db_T2_Logging_Tenant_Search.SearchParam>
                </tlbwa:Db_T2_Logging_Tenant_Search>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_1">
                  <Assign.To>
                    <OutArgument x:TypeArguments="tlbei:ITenant_biz[]">
                      <mca:CSharpReference x:TypeArguments="tlbei:ITenant_biz[]">tenantParams</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="tlbei:ITenant_biz[]">
                      <mca:CSharpValue x:TypeArguments="tlbei:ITenant_biz[]">tenantParams.Where(f =&gt; f.TenantName.Equals(Param.TenantName)).ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
                <If sap2010:WorkflowViewState.IdRef="If_1">
                  <If.Condition>
                    <InArgument x:TypeArguments="x:Boolean">
                      <mca:CSharpValue x:TypeArguments="x:Boolean">tenantParams.Count() != 0</mca:CSharpValue>
                    </InArgument>
                  </If.Condition>
                  <If.Then>
                    <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_1" Reason="The Tenant already exists.">
                      <TerminateWorkflow.Exception>
                        <InArgument x:TypeArguments="s:Exception">
                          <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("The Tenant already exists.")</mca:CSharpValue>
                        </InArgument>
                      </TerminateWorkflow.Exception>
                    </TerminateWorkflow>
                  </If.Then>
                </If>
                <TryCatch sap2010:WorkflowViewState.IdRef="TryCatch_1">
                  <TryCatch.Try>
                    <tlbwa:Db_T2_Logging_Tenant_Add DisplayName="Tenant_Add" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Tenant_Add_1">
                      <tlbwa:Db_T2_Logging_Tenant_Add.AddParam>
                        <InArgument x:TypeArguments="tlbei:ITenant_biz">
                          <mca:CSharpValue x:TypeArguments="tlbei:ITenant_biz">Param</mca:CSharpValue>
                        </InArgument>
                      </tlbwa:Db_T2_Logging_Tenant_Add.AddParam>
                      <tlbwa:Db_T2_Logging_Tenant_Add.BS>
                        <InArgument x:TypeArguments="tlb:IBusinessService">
                          <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                        </InArgument>
                      </tlbwa:Db_T2_Logging_Tenant_Add.BS>
                      <tlbwa:Db_T2_Logging_Tenant_Add.RetVal>
                        <OutArgument x:TypeArguments="scg:IDictionary(x:String, x:Int32)">
                          <mca:CSharpReference x:TypeArguments="scg:IDictionary(x:String, x:Int32)">RetVal</mca:CSharpReference>
                        </OutArgument>
                      </tlbwa:Db_T2_Logging_Tenant_Add.RetVal>
                    </tlbwa:Db_T2_Logging_Tenant_Add>
                  </TryCatch.Try>
                  <TryCatch.Catches>
                    <Catch x:TypeArguments="s:Exception" sap2010:WorkflowViewState.IdRef="Catch`1_1">
                      <ActivityAction x:TypeArguments="s:Exception">
                        <ActivityAction.Argument>
                          <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
                        </ActivityAction.Argument>
                        <Assign sap2010:WorkflowViewState.IdRef="Assign_2">
                          <Assign.To>
                            <OutArgument x:TypeArguments="s:Exception">
                              <mca:CSharpReference x:TypeArguments="s:Exception">Ex</mca:CSharpReference>
                            </OutArgument>
                          </Assign.To>
                          <Assign.Value>
                            <InArgument x:TypeArguments="s:Exception">
                              <mca:CSharpValue x:TypeArguments="s:Exception">exception</mca:CSharpValue>
                            </InArgument>
                          </Assign.Value>
                        </Assign>
                      </ActivityAction>
                    </Catch>
                  </TryCatch.Catches>
                </TryCatch>
              </Sequence>
            </FlowStep>
            <FlowStep x:Key="Update" x:Name="__ReferenceID2" sap2010:WorkflowViewState.IdRef="FlowStep_2">
              <Sequence DisplayName="Update Sequence" sap2010:WorkflowViewState.IdRef="Sequence_2">
                <tlbwa:Db_T2_Logging_Tenant_Search DisplayName="Tenant_Search" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Tenant_Search_2">
                  <tlbwa:Db_T2_Logging_Tenant_Search.BS>
                    <InArgument x:TypeArguments="tlb:IBusinessService">
                      <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                    </InArgument>
                  </tlbwa:Db_T2_Logging_Tenant_Search.BS>
                  <tlbwa:Db_T2_Logging_Tenant_Search.RetVal>
                    <OutArgument x:TypeArguments="tlbei:ITenant_biz[]">
                      <mca:CSharpReference x:TypeArguments="tlbei:ITenant_biz[]">tenantParams</mca:CSharpReference>
                    </OutArgument>
                  </tlbwa:Db_T2_Logging_Tenant_Search.RetVal>
                  <tlbwa:Db_T2_Logging_Tenant_Search.SearchParam>
                    <InArgument x:TypeArguments="tlbesi:ITenantSearch_biz">
                      <mca:CSharpValue x:TypeArguments="tlbesi:ITenantSearch_biz">new TenantSearch_biz{ Action="Search", PageNumber=1, PageSize=10, Role="user", SortColumn="TenantID", SortType="asc", TenantName=Param.TenantName}</mca:CSharpValue>
                    </InArgument>
                  </tlbwa:Db_T2_Logging_Tenant_Search.SearchParam>
                </tlbwa:Db_T2_Logging_Tenant_Search>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_6">
                  <Assign.To>
                    <OutArgument x:TypeArguments="tlbei:ITenant_biz[]">
                      <mca:CSharpReference x:TypeArguments="tlbei:ITenant_biz[]">tenantParams</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="tlbei:ITenant_biz[]">
                      <mca:CSharpValue x:TypeArguments="tlbei:ITenant_biz[]">tenantParams.Where(f =&gt; f.TenantName.Equals(Param.TenantName)).ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
                <If sap2010:WorkflowViewState.IdRef="If_5">
                  <If.Condition>
                    <InArgument x:TypeArguments="x:Boolean">
                      <mca:CSharpValue x:TypeArguments="x:Boolean">tenantParams.Count() != 0</mca:CSharpValue>
                    </InArgument>
                  </If.Condition>
                  <If.Then>
                    <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_6" Reason="The Tenant already exists.">
                      <TerminateWorkflow.Exception>
                        <InArgument x:TypeArguments="s:Exception">
                          <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("The Tenant already exists.")</mca:CSharpValue>
                        </InArgument>
                      </TerminateWorkflow.Exception>
                    </TerminateWorkflow>
                  </If.Then>
                </If>
                <Sequence sap2010:WorkflowViewState.IdRef="Sequence_4">
                  <tlbwa:Db_T2_Logging_Tenant_GetOne DisplayName="Tenant_GetOne" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Tenant_GetOne_1">
                    <tlbwa:Db_T2_Logging_Tenant_GetOne.BS>
                      <InArgument x:TypeArguments="tlb:IBusinessService">
                        <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                      </InArgument>
                    </tlbwa:Db_T2_Logging_Tenant_GetOne.BS>
                    <tlbwa:Db_T2_Logging_Tenant_GetOne.RetVal>
                      <OutArgument x:TypeArguments="tlbei:ITenant_biz">
                        <mca:CSharpReference x:TypeArguments="tlbei:ITenant_biz">tenantParam</mca:CSharpReference>
                      </OutArgument>
                    </tlbwa:Db_T2_Logging_Tenant_GetOne.RetVal>
                    <tlbwa:Db_T2_Logging_Tenant_GetOne.TenantID>
                      <InArgument x:TypeArguments="x:Int32">
                        <mca:CSharpValue x:TypeArguments="x:Int32">Param.TenantID</mca:CSharpValue>
                      </InArgument>
                    </tlbwa:Db_T2_Logging_Tenant_GetOne.TenantID>
                  </tlbwa:Db_T2_Logging_Tenant_GetOne>
                  <If sap2010:WorkflowViewState.IdRef="If_3">
                    <If.Condition>
                      <InArgument x:TypeArguments="x:Boolean">
                        <mca:CSharpValue x:TypeArguments="x:Boolean">tenantParam!=null</mca:CSharpValue>
                      </InArgument>
                    </If.Condition>
                    <If.Then>
                      <TryCatch sap2010:WorkflowViewState.IdRef="TryCatch_2">
                        <TryCatch.Try>
                          <tlbwa:Db_T2_Logging_Tenant_Modify DisplayName="Tenant_Modify" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Tenant_Modify_1">
                            <tlbwa:Db_T2_Logging_Tenant_Modify.BS>
                              <InArgument x:TypeArguments="tlb:IBusinessService">
                                <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                              </InArgument>
                            </tlbwa:Db_T2_Logging_Tenant_Modify.BS>
                            <tlbwa:Db_T2_Logging_Tenant_Modify.ModifyParam>
                              <InArgument x:TypeArguments="tlbei:ITenant_biz">
                                <mca:CSharpValue x:TypeArguments="tlbei:ITenant_biz">Param</mca:CSharpValue>
                              </InArgument>
                            </tlbwa:Db_T2_Logging_Tenant_Modify.ModifyParam>
                            <tlbwa:Db_T2_Logging_Tenant_Modify.RetVal>
                              <OutArgument x:TypeArguments="scg:IDictionary(x:String, x:Int32)">
                                <mca:CSharpReference x:TypeArguments="scg:IDictionary(x:String, x:Int32)">RetVal</mca:CSharpReference>
                              </OutArgument>
                            </tlbwa:Db_T2_Logging_Tenant_Modify.RetVal>
                          </tlbwa:Db_T2_Logging_Tenant_Modify>
                        </TryCatch.Try>
                        <TryCatch.Catches>
                          <Catch x:TypeArguments="s:Exception" sap2010:WorkflowViewState.IdRef="Catch`1_2">
                            <ActivityAction x:TypeArguments="s:Exception">
                              <ActivityAction.Argument>
                                <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
                              </ActivityAction.Argument>
                              <Assign sap2010:WorkflowViewState.IdRef="Assign_4">
                                <Assign.To>
                                  <OutArgument x:TypeArguments="s:Exception">
                                    <mca:CSharpReference x:TypeArguments="s:Exception">Ex</mca:CSharpReference>
                                  </OutArgument>
                                </Assign.To>
                                <Assign.Value>
                                  <InArgument x:TypeArguments="s:Exception">
                                    <mca:CSharpValue x:TypeArguments="s:Exception">exception</mca:CSharpValue>
                                  </InArgument>
                                </Assign.Value>
                              </Assign>
                            </ActivityAction>
                          </Catch>
                        </TryCatch.Catches>
                      </TryCatch>
                    </If.Then>
                    <If.Else>
                      <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_3" Reason="The Tenant is not found.">
                        <TerminateWorkflow.Exception>
                          <InArgument x:TypeArguments="s:Exception">
                            <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("The Tenant is not found.")</mca:CSharpValue>
                          </InArgument>
                        </TerminateWorkflow.Exception>
                      </TerminateWorkflow>
                    </If.Else>
                  </If>
                </Sequence>
              </Sequence>
            </FlowStep>
            <FlowStep x:Key="Remove" x:Name="__ReferenceID3" sap2010:WorkflowViewState.IdRef="FlowStep_3">
              <Sequence DisplayName="Delete Sequence" sap2010:WorkflowViewState.IdRef="Sequence_3">
                <Sequence.Variables>
                  <Variable x:TypeArguments="tlbei:IApplication_biz[]" Name="appList" />
                </Sequence.Variables>
                <tlbwa:Db_T2_Logging_Application_GetAll DisplayName="Application_GetAll" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Application_GetAll_1">
                  <tlbwa:Db_T2_Logging_Application_GetAll.BS>
                    <InArgument x:TypeArguments="tlb:IBusinessService">
                      <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                    </InArgument>
                  </tlbwa:Db_T2_Logging_Application_GetAll.BS>
                  <tlbwa:Db_T2_Logging_Application_GetAll.Param>
                    <InArgument x:TypeArguments="tlbei:IApplication_biz">
                      <mca:CSharpValue x:TypeArguments="tlbei:IApplication_biz">new Application_biz { Action = "GetAll", PageNumber = 1, PageSize = 10, SortColumn = "ApplicationId", SortType = "asc" }</mca:CSharpValue>
                    </InArgument>
                  </tlbwa:Db_T2_Logging_Application_GetAll.Param>
                  <tlbwa:Db_T2_Logging_Application_GetAll.RetVal>
                    <OutArgument x:TypeArguments="tlbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="tlbei:IApplication_biz[]">appList</mca:CSharpReference>
                    </OutArgument>
                  </tlbwa:Db_T2_Logging_Application_GetAll.RetVal>
                </tlbwa:Db_T2_Logging_Application_GetAll>
                <Assign sap2010:WorkflowViewState.IdRef="Assign_5">
                  <Assign.To>
                    <OutArgument x:TypeArguments="tlbei:IApplication_biz[]">
                      <mca:CSharpReference x:TypeArguments="tlbei:IApplication_biz[]">appList</mca:CSharpReference>
                    </OutArgument>
                  </Assign.To>
                  <Assign.Value>
                    <InArgument x:TypeArguments="tlbei:IApplication_biz[]">
                      <mca:CSharpValue x:TypeArguments="tlbei:IApplication_biz[]">appList.Where(f=&gt;f.TenantID==Param.TenantID).ToArray()</mca:CSharpValue>
                    </InArgument>
                  </Assign.Value>
                </Assign>
                <If DisplayName="If Logs are exists" sap2010:WorkflowViewState.IdRef="If_4">
                  <If.Condition>
                    <InArgument x:TypeArguments="x:Boolean">
                      <mca:CSharpValue x:TypeArguments="x:Boolean">appList.Count() &gt; 0</mca:CSharpValue>
                    </InArgument>
                  </If.Condition>
                  <If.Then>
                    <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_4" Reason="The Tenant cannot be removed. First remove the applications.">
                      <TerminateWorkflow.Exception>
                        <InArgument x:TypeArguments="s:Exception">
                          <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("The Tenant cannot be removed. First remove the applications")</mca:CSharpValue>
                        </InArgument>
                      </TerminateWorkflow.Exception>
                    </TerminateWorkflow>
                  </If.Then>
                  <If.Else>
                    <TryCatch sap2010:WorkflowViewState.IdRef="TryCatch_3">
                      <TryCatch.Try>
                        <tlbwa:Db_T2_Logging_Tenant_Remove DisplayName="Tenant_Remove" sap2010:WorkflowViewState.IdRef="Db_T2_Logging_Tenant_Remove_1">
                          <tlbwa:Db_T2_Logging_Tenant_Remove.BS>
                            <InArgument x:TypeArguments="tlb:IBusinessService">
                              <mca:CSharpValue x:TypeArguments="tlb:IBusinessService">BusinessService</mca:CSharpValue>
                            </InArgument>
                          </tlbwa:Db_T2_Logging_Tenant_Remove.BS>
                          <tlbwa:Db_T2_Logging_Tenant_Remove.RemoveParam>
                            <InArgument x:TypeArguments="tlbei:ITenant_biz">
                              <mca:CSharpValue x:TypeArguments="tlbei:ITenant_biz">Param</mca:CSharpValue>
                            </InArgument>
                          </tlbwa:Db_T2_Logging_Tenant_Remove.RemoveParam>
                          <tlbwa:Db_T2_Logging_Tenant_Remove.RetVal>
                            <OutArgument x:TypeArguments="scg:IDictionary(x:String, x:Int32)">
                              <mca:CSharpReference x:TypeArguments="scg:IDictionary(x:String, x:Int32)">RetVal</mca:CSharpReference>
                            </OutArgument>
                          </tlbwa:Db_T2_Logging_Tenant_Remove.RetVal>
                        </tlbwa:Db_T2_Logging_Tenant_Remove>
                      </TryCatch.Try>
                      <TryCatch.Catches>
                        <Catch x:TypeArguments="s:Exception" sap2010:WorkflowViewState.IdRef="Catch`1_3">
                          <ActivityAction x:TypeArguments="s:Exception">
                            <ActivityAction.Argument>
                              <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
                            </ActivityAction.Argument>
                            <Throw sap2010:WorkflowViewState.IdRef="Throw_1">
                              <InArgument x:TypeArguments="s:Exception">
                                <mca:CSharpValue x:TypeArguments="s:Exception">exception</mca:CSharpValue>
                              </InArgument>
                            </Throw>
                          </ActivityAction>
                        </Catch>
                      </TryCatch.Catches>
                    </TryCatch>
                  </If.Else>
                </If>
              </Sequence>
            </FlowStep>
          </FlowSwitch>
        </FlowDecision.True>
        <FlowDecision.False>
          <FlowStep x:Name="__ReferenceID5" sap2010:WorkflowViewState.IdRef="FlowStep_4">
            <TerminateWorkflow sap2010:WorkflowViewState.IdRef="TerminateWorkflow_5" Reason="User is not a super admin">
              <TerminateWorkflow.Exception>
                <InArgument x:TypeArguments="s:Exception">
                  <mca:CSharpValue x:TypeArguments="s:Exception">new Exception("Not authorized")</mca:CSharpValue>
                </InArgument>
              </TerminateWorkflow.Exception>
            </TerminateWorkflow>
          </FlowStep>
        </FlowDecision.False>
      </FlowDecision>
    </Flowchart.StartNode>
    <x:Reference>__ReferenceID0</x:Reference>
    <x:Reference>__ReferenceID1</x:Reference>
    <x:Reference>__ReferenceID2</x:Reference>
    <x:Reference>__ReferenceID3</x:Reference>
    <x:Reference>__ReferenceID4</x:Reference>
    <x:Reference>__ReferenceID5</x:Reference>
    <sads:DebugSymbol.Symbol>d1FDOlxQcm9qZWN0c1xUMlx0MmxvZ1xUMi5Mb2dnaW5nXFQyLkxvZ2dpbmcuQnVzaW5lc3NcV29ya2Zsb3dzXFRlbmFudE5vblF1ZXJ5LnhhbWxORgOfAw8CAQFOC05rAwGEA40DDZMDIQMB+gJTD1NZAwHyArECD4cDGgMBhQKxAQ+uAhoCAW1WD64BGgIBAo0DXY0DeAMBgwOQAxOQA3MDAfsCtQIRxQI6AwHWAsYCEdECGgMBwwLSAhGGAxYDAYYCsgERwgE1AwHsAcMBEc4BGgMB2wHPARHeARYDAcgB3wERrQIcAgFuVxFnNQIBVGgRcxoCAUN0EYMBFgIBMIQBEa0BHAIBA8ICF8ICdAMB6QK9Ahe9AtsBAwHgArgCF7gCcAMB1wLOAhfOAp4BAwHNAskCF8kCdAMBxALVAhfVAmwDAYcC2QIV3wIpAwG4AuICFYQDIAMBkAK6ARe6AXQDAf0BvwEXvwH3AQMB9QG1ARe1AXADAe0BywEXywGrAQMB5AHGARfGAXQDAdwB0gEX0gFvAwHJAdYBFdwBKQMB0QHgARPwATcDAa8B8QETrAIYAgFvXxdfdAIBZWQXZPcBAgFdWhdacAIBVXAXcKsBAgFMaxdrdAIBRHcXd28CATF7FYEBKQIBOYYBFZYBNgIBF54BGakBIgIBBNkCZdkCowEDAcIC3AIb3AKoAQMBuQLkAhn0Aj0DAZwC/AIdgAMlAwGRAtYBZdYBgQEDAdoB2QEb2QGHAQMB0gHoARnoAXMDAcAB7QEZ7QFkAwG4AeMBGeMBcgMBsAH0ARn0AWkCAXD4ARehAiIDAYIBpAIXqgIrAgF4e2V7gQECAUJ+G36HAQIBOpMBG5MBgQECASiJARuJAWcCASCOARuOAXQCARimAR+mAWkCAQ6hAR+hAWoCAQXxAh/xAoUBAwGvAucCH+cCeAMBpgLsAh/sAmsDAZ0C/gIh/gJrAwGSAvoBG4oCPwMBlgGSAh+dAigDAYMBpAJnpAKBAQMBgQGnAh2nAocBAgF5hwIhhwKHAQMBpwH9ASH9AXoDAZ8BggIhggJtAwGXAZoCJZoCbwMBjQGVAiWVAnADAYQB</sads:DebugSymbol.Symbol>
  </Flowchart>
  <sap2010:WorkflowViewState.ViewStateManager>
    <sap2010:ViewStateManager>
      <sap2010:ViewStateData Id="Db_T2_Logging_Tenant_Search_1" sap:VirtualizedContainerService.HintSize="464,22" />
      <sap2010:ViewStateData Id="Assign_1" sap:VirtualizedContainerService.HintSize="464,62" />
      <sap2010:ViewStateData Id="TerminateWorkflow_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_1" sap:VirtualizedContainerService.HintSize="464,210" />
      <sap2010:ViewStateData Id="Db_T2_Logging_Tenant_Add_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Assign_2" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Catch`1_1" sap:VirtualizedContainerService.HintSize="404,21">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TryCatch_1" sap:VirtualizedContainerService.HintSize="464,287" />
      <sap2010:ViewStateData Id="Sequence_1" sap:VirtualizedContainerService.HintSize="200,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_1">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">10,394.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_Logging_Tenant_Search_2" sap:VirtualizedContainerService.HintSize="665,22" />
      <sap2010:ViewStateData Id="Assign_6" sap:VirtualizedContainerService.HintSize="665,62" />
      <sap2010:ViewStateData Id="TerminateWorkflow_6" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_5" sap:VirtualizedContainerService.HintSize="665,210" />
      <sap2010:ViewStateData Id="Db_T2_Logging_Tenant_GetOne_1" sap:VirtualizedContainerService.HintSize="643,22" />
      <sap2010:ViewStateData Id="Db_T2_Logging_Tenant_Modify_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Assign_4" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="Catch`1_2" sap:VirtualizedContainerService.HintSize="404,21">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TryCatch_2" sap:VirtualizedContainerService.HintSize="418,287">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TerminateWorkflow_3" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="If_3" sap:VirtualizedContainerService.HintSize="643,437" />
      <sap2010:ViewStateData Id="Sequence_4" sap:VirtualizedContainerService.HintSize="665,623">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_2" sap:VirtualizedContainerService.HintSize="200,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_2">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">230,394.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Db_T2_Logging_Application_GetAll_1" sap:VirtualizedContainerService.HintSize="242,22" />
      <sap2010:ViewStateData Id="Assign_5" sap:VirtualizedContainerService.HintSize="242,62" />
      <sap2010:ViewStateData Id="TerminateWorkflow_4" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Db_T2_Logging_Tenant_Remove_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Throw_1" sap:VirtualizedContainerService.HintSize="200,22" />
      <sap2010:ViewStateData Id="Catch`1_3" sap:VirtualizedContainerService.HintSize="404,21">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TryCatch_3" sap:VirtualizedContainerService.HintSize="418,287">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="If_4" sap:VirtualizedContainerService.HintSize="242,51">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <x:Boolean x:Key="IsPinned">False</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Sequence_3" sap:VirtualizedContainerService.HintSize="264,339">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_3">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">450,394.5</av:Point>
            <av:Size x:Key="ShapeSize">200,51</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowSwitch`1_1" sap:VirtualizedContainerService.HintSize="70,87">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <av:Point x:Key="ShapeLocation">295,246.5</av:Point>
            <av:Size x:Key="ShapeSize">70,87</av:Size>
            <av:PointCollection x:Key="AddConnector">295,290 110,290 110,394.5</av:PointCollection>
            <av:PointCollection x:Key="UpdateConnector">330,333.5 330,394.5</av:PointCollection>
            <av:PointCollection x:Key="RemoveConnector">365,290 550,290 550,394.5</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="TerminateWorkflow_5" sap:VirtualizedContainerService.HintSize="200,22">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowStep_4">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <av:Point x:Key="ShapeLocation">480,250</av:Point>
            <av:Size x:Key="ShapeSize">200,22</av:Size>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="FlowDecision_1" sap:VirtualizedContainerService.HintSize="70,87">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">True</x:Boolean>
            <av:Point x:Key="ShapeLocation">435,56.5</av:Point>
            <av:Size x:Key="ShapeSize">70,87</av:Size>
            <av:PointCollection x:Key="TrueConnector">435,100 330,100 330,246.5</av:PointCollection>
            <av:PointCollection x:Key="FalseConnector">505,100 580,100 580,250</av:PointCollection>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="Flowchart_1" sap:VirtualizedContainerService.HintSize="694,636">
        <sap:WorkflowViewStateService.ViewState>
          <scg:Dictionary x:TypeArguments="x:String, x:Object">
            <x:Boolean x:Key="IsExpanded">False</x:Boolean>
            <av:Point x:Key="ShapeLocation">300,0</av:Point>
            <av:Size x:Key="ShapeSize">60,75</av:Size>
            <av:PointCollection x:Key="ConnectorLocation">360,37.5 470,37.5 470,56.5</av:PointCollection>
            <x:Double x:Key="Width">680</x:Double>
          </scg:Dictionary>
        </sap:WorkflowViewStateService.ViewState>
      </sap2010:ViewStateData>
      <sap2010:ViewStateData Id="T2.Logging.Business.Workflows.ApplicationNonQuery_1" sap:VirtualizedContainerService.HintSize="734,716" />
    </sap2010:ViewStateManager>
  </sap2010:WorkflowViewState.ViewStateManager>
</Activity>